package com.cg.p1_DemoGetSum;

import java.util.Random;

public class DemoGetSumTest {
    public static void main(String[] args) {

        Random r = new Random();
        int num = r.nextInt(100);
        System.out.println("num = " + num);

//        int a=10,b=20;
//        System.out.println(a+"+"+b+"="+getSum(a, b));
//        System.out.println(getMax(a, b));
//        System.out.println(getMin(a, b));
//        System.out.println("平均值:"+getAvg(a, b));
//        NH();
    }
    public static int getSum(int a,int b){
        int sum = a+b;
        return sum;
    }

    public static int getMax(int a,int b){
        if (a>b){
            return a;
        }
        return b;
    }
    public static int getMin(int a,int b){
        if (a>b){
            return b;
        }
        return a;
    }
    public static int getAvg(int a,int b){
        int avg = (a+b)/2;
        return avg;
    }
    public static void NH(){
        System.out.println("Hello World");
    }


}
